package pl.edu.agh.inpema.core.components;

import java.util.List;

import pl.edu.agh.inpema.core.dataBase.DataBase;
import pl.edu.agh.inpema.core.model.Message;
import pl.edu.agh.inpema.core.queue.Queue;

public interface AnalyzerUtil {

	/**
	 * gets analyzer name
	 * @return analyzer name
	 */
	public String getAnalyzerName();
	/**
	 * sets analyzer name
	 * @param name analyzer name
	 */
	public void setAnalyzerName(String name);
	
	/**
	 * get next message from receiver
	 * @return nest message or null, when no message in some amount of time appears
	 */
	public Message getNextMessage();
	
	/**
	 * get resultId of profile. If no such result - create one.
	 * @param profileId profileId
	 * @return resultId of profile
	 */
	public int getResultId(int profileId);
	
	/**
	 * get all result data objects
	 * @param resultId resultId
	 * @param cls result data classes
	 * @return list of all result data objects
	 */
	public List<Object> getResultObjects(int resultId, Class cls);
	
	/**
	 * add result object
	 * @param obj result object
	 */
	public void addResultObject(Object obj);
	
	/**
	 * sets the dataBase
	 * @param dataBase dataBase
	 */
	public void setDataBase(DataBase dataBase);
	/**
	 * sets the Queue
	 * @param queue queue
	 */
	public void setQueue(Queue queue);
}
